package com.xbongbong.pro.message.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.pro.constant.CommonConstant;
import lombok.Getter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Description: 消息列表筛选初始化 时间 标签枚举
 * @author 魏荣杰
 * @date 2019/1/7 19:25
 * @version v1.0
 * @since v1.0
 */
@Getter
public enum MessageListSearchFilterTimeTagEnum {
    /**
     * 全部
     */
    ALL(1, CommonConstant.ALL, "all"),
    /**
     * 今日
     */
    TODAY(2, CommonConstant.TODAY, "today"),
    /**
     * 本周
     */
    THIS_WEEK(3, CommonConstant.THIS_WEEK, "thisWeek"),
    /**
     * 本月
     */
    THIS_MONTH(4, CommonConstant.THIS_MONTH, "thisMonth")
    ;

    /**
     * 枚举值
     */
    private Integer id;

    /**
     * 标签名称
     */
    private String name;

    private String alias;

    MessageListSearchFilterTimeTagEnum(Integer id, String name, String alias) {
        this.id = id;
        this.name = name;
        this.alias = alias;
    }

    /**
     * Description: 获取所有的枚举
     * @return java.util.List<com.xbongbong.pro.message.enums.MessageListSearchFilterTimeTagEnum>
     * @author 魏荣杰
     * @date 2019/1/8 14:23
     * @since v1.0
     */
    public static List<MessageListSearchFilterTimeTagEnum> getAllEnum() {
        List<MessageListSearchFilterTimeTagEnum> list = new ArrayList<>();
        list.addAll(Arrays.asList(values()));
        return list;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }
}
